Constants
The following constants have been added to the list of selectors that can be passed to
SCGetInfo
and
SCSetInfo
. These selectors are only supported by the standard sound dialog component, not the standard image-compression dialog component.
-
scSoundSampleRateType
-
A pointer to an
UnsignedFixed
value that represents the current sample rate.
-
scSoundSampleSizeType
-
A pointer to a short integer that represents the current sample size. This value is either 8 or 16.
-
scSoundChannelCountType
-
A pointer to a short integer that represents the current number of channels. This value is either 1 or 2.
-
scSoundCompressionType
-
A pointer to a value of type
OSType
that represents the current compression type. This value is either kRawCodecType or one of the available sound compression formats.
-
scCompressionListType
-
A pointer to a handle containing an array of values of type
OSType
that indicate the sound compression formats that may be presented to the user. Pass
nil
to
SCSetInfo
to reset the list to all available sound compression formats.
The standard sound dialog component also supports the following selectors.
-
scPreferenceFlagsType
-
The only flag that is supported in the preferences is
scUseMovableModal
. All other flags should be set to zero. The preference flags are initialized to
scUseMovableModal
when the standard sound dialog component is instantiated.
-
scExtendedProcsType
-
The only fields supported are
filterProc
and
refcon
. All other fields should be initialized to zero. The filter procedure should only be used to update background windows. It should not be used to intercept user interactions in the dialog box window itself.
-
scSettingsStateType
-
This selector is supported in the same way as in the standard image-compression component.
Functions
The standard sound dialog component implements the following functions from the standard compression component interface. For more details, see the "Standard Image-Compression Dialog Components" chapter of
Inside Macintosh: QuickTime Components
.
-
SCGetInfo
-
This function supports all of the selectors documented in the "Constants" section. If an unsupported selector is used, it returns
scTypeNotFoundErr
.
-
SCSetInfo
-
This function supports all of the selectors documented in the "Constants" section. If an unsupported selector is used, it returns
scTypeNotFoundErr
.
-
SCRequestImageSettings
-
This function displays the sound settings dialog. If the user cancels the dialog box, the
userCanceledErr
is returned. To provide a filter procedure to process events while the dialog box is displayed, use
SCSetInfo
with the
scExtendedProcsType
selector.
SCGetSettingsAsAtomContainer
The SCGetSettingsAsAtomContainer routine retrieves the current configuration from the standard image-compression component.
pascal ComponentResult SCGetSettingsAsAtomContainer (
ComponentInstance ci,
QTAtomContainer *settings);
-
ci
-
The standard compression component instance.
-
settings
-
The address where the newly-created atom container should be stored by the call.
DISCUSSION
The caller is responsible for disposing of the returned QT atom container.
SCSetSettingsFromAtomContainer
The SCSetSettingsFromAtomContainer routine sets the standard image-compression component's current configuration from the passed settings data.
pascal ComponentResult SCSetSettingsFromAtomContainer (
ComponentInstance ci,
QTAtomContainer settings);
-
ci
-
Standard compression component instance.
-
settings
-
Contains a QT atom container reference to the settings.
DISCUSSION
The
settings
QT atom container may contain atoms other than those expected by the particular component type or may be missing certain atoms. The function will only use settings it understands.